1. Field of the Invention
The present invention relates to a motor current controller and a method for controlling motor current which are suitable to be implemented for controlling a stepping motor.
2. Description of the Related Art
In JP-A-2002-204150, a technique of driving a stepping motor by PWM control is described. According to this technique, control of a “charge mode”, a “fast decay mode”, and a “slow decay mode” is repeated for each PWM cycle. Here, the charge mode is an operation mode in which a current supplied to a stator winding increases, the fast decay mode is an operation mode in which the current is decreased at a high speed, and the slow decay mode is an operation mode in which the current is decreased at a low speed. In the following description, the fast decay mode and the slow decay mode may are both simply referred to as a “decay mode”.
These operation modes are switched to one another based on a comparison result of a target current value (for example, a waveform which is obtained by approximating a sine wave using a stepwise wave) supplied to the stepping motor with a measured current value. That is, the charge mode can be selected when the measured current value is equal to or less than the target current value, and the decay mode can be selected when the measured current value is greater than the target current value. However, in any operation mode, it is difficult to predict the waveform of the measured current value in advance. A current waveform in the charge mode varies depending on a drive voltage of the motor, a rotation speed of the motor, a load torque condition of the motor, a temperature environment, and the like.
Since inductance of the stator winding varies depending on a positional relationship of a rotor and a stator, a decay speed of a current in the decay mode also varies depending on the positional relationship. When the measured current value departs from the prediction and, for example, a phenomenon in which the measured current value greatly drops occurs, ripples of the current waveform increase to compensate for the drop. Accordingly, torque loss, vibration, noise, or the like of the motor occurs and frequent switching of a coil voltage and current-supply direction between the charge mode and the fast decay mode may cause electromagnetic noise.
In order to cope with this problem, in the technique described in JP-A-2002-204150, two comparators are provided to compare the measured current value with two reference values and the operation mode is switched based on the comparison result and/or the time. In another technique, the ripples are suppressed by shortening the PWM cycle.
However, providing two comparators as described in JP-A-2002-204150 causes an increase in cost. Also, shortening the PWM cycle requires a controller to be capable of coping with a high-speed operation, and thus also causes an increase in cost.